<?php
namespace console\models\logics;

use common\logics\DynamicLogic as Logic;
use console\models\UserForDynamicLogic;

class DynamicMessLogic extends Logic {
    public function fields() {
        return [
            'id',
            'format',
            'text' => 'content',
            'pics',
            'video',
            'article',
            'time' => 'created_at',
            'retweet',
        ];
    }

    public function getUser() {
        return $this->hasOne(UserForDynamicLogic::className(), ['id' => 'user_id']);
    }
}
